package GUI;

import java.awt.Component;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JPanel;

public class MainClass  implements ActionListener{
	Panel2 pan2;
	
	private static final long serialVersionUID = 1L;

	/**
	 * @param args
	 */
	public MainClass(){
		 pan2 = new Panel2();
		 pan2.btnPanel.addActionListener(this);
	}
	
	public void start()
	{
		GUIMeanger.frame.PutPannel(pan2);	
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		if (e.getSource() ==  pan2.btnPanel)
		{	
			System.out.println("MOve back");
			GUIMeanger.frame.PutPannel(GUIMeanger.getMainPanel());	
		}
	}

}
